﻿
#include "finiteaqs.h"
#include <QApplication>
#include <QDebug>
#define console_log qDebug()

HANDLE hDevice = INVALID_HANDLE_VALUE;
int main(int argc, char *argv[])
{
    QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling,true);
    // 第一步 创建设备对象，后续步骤在Acqure类中进行
    hDevice = USB5630_DEV_Create(0, 0);

    QApplication a(argc, argv);
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
    QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor);
#endif
    qRegisterMetaType<cv::Mat>("cv::Mat");
    qRegisterMetaType<cv::Mat>("cv::Mat&");
    FiniteAqs w(nullptr, hDevice);
    w.show();
    if(hDevice == INVALID_HANDLE_VALUE)
    {
        w.log_update("DEV_Create Error");
    }
    return a.exec();
}
